<% import grails.persistence.Event %>
<%=packageName%>
<!DOCTYPE html>
<html>
  <head>
    <meta name="layout" content="admin">
  <g:set var="entityName" value="\${message(code: '${domainClass.propertyName}.label', default: '${className}')}" />
  <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
  
  <div class="header">

    <h1 class="page-title"><g:message code="default.show.label" args="[entityName]" /></h1>
    <ul class="breadcrumb">
      <li><a href="\${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
      <li><g:link action="index"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
      <li class="active"><g:message code="default.show.label" args="[entityName]" /></li>
    </ul>

  </div>
  
  
  <div class="main-content">
        <g:if test="\${flash.message}">
          <bootstrap:alert class="alert-info">\${flash.message}</bootstrap:alert>
        </g:if>


        <dl class="dl-horizontal">
          <%  excludedProps = Event.allEvents.toList() << 'id' << 'version'
allowedNames = domainClass.persistentProperties*.name << 'dateCreated' << 'lastUpdated'
props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) && (domainClass.constrainedProperties[it.name] ? domainClass.constrainedProperties[it.name].display : true) }
Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))
props.each { p -> %>
          <dt><g:message code="${domainClass.propertyName}.${p.name}.label" default="${p.naturalName}" /></dt>
          <dd>
          <%  if (p.isEnum()) { %>
          <g:fieldValue bean="\${${propertyName}}" field="${p.name}"/>
    <%  } else if (p.oneToMany || p.manyToMany) { %>
        
    <%  } else if (p.manyToOne || p.oneToOne) { %>
        <g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${propertyName}?.${p.name}?.id}">\${${propertyName}?.${p.name}?.encodeAsHTML()}</g:link>
    <%  } else if (p.type == Boolean || p.type == boolean) { %>
        <g:formatBoolean boolean="\${${propertyName}?.${p.name}}" />
    <%  } else if (p.type == Date || p.type == java.sql.Date || p.type == java.sql.Time || p.type == Calendar) { %>
        <g:formatDate date="\${${propertyName}?.${p.name}}" />
    <%  } else if (!p.type.isArray()) { %>
        <g:fieldValue bean="\${${propertyName}}" field="${p.name}"/>
    <%  } %>
          
          </dd>
<%  } %>
        </dl>
        <div class="form-actions">
          

            <g:link class="btn btn-primary" action="list" ><g:message code="default.button.list.label" default="List" /></g:link>
            <g:link class="btn btn-primary" action="edit" resource="\${${propertyName}}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
            

          
        </div>
      </div>



 
</body>
</html>
